import time


def get_time_str(prefix='', postfix=''):
    time_str = time.strftime('%Y-%m-%d_%H-%M-%S', time.localtime())
    if prefix != '':
        prefix = prefix + '_'
    if postfix != '':
        postfix = '_' + postfix
    return prefix + time_str + postfix
